import os
import zipfile

wallpaper_name = input("Please input wallpaper name:")
wallpaper_zip_obj = zipfile.ZipFile("./dist/%s.zip" % wallpaper_name, "w")
for dir_path, dir_names, file_names in os.walk(wallpaper_name):
    fpath = dir_path.replace(wallpaper_name, '')
    for filename in file_names:
        wallpaper_zip_obj.write(os.path.join(dir_path, filename), os.path.join(fpath, filename))
wallpaper_zip_obj.close()
